package com.tensquare.recruit.dao;

import com.tensquare.recruit.pojo.Recruit;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

public interface RecruitDao extends JpaRepository<Recruit,String>,JpaSpecificationExecutor<Recruit> {

    //查询职位推荐列表
    //查询状态为2并以创建日期降序排序，查询前4条记录
    public List<Recruit> findTop4ByStateOrderByCreatetimeDesc(String state);

    //最新职位列表
    //查询状态不为0并以创建日期降序排序，查询前12条记录
    public List<Recruit> findTop12ByStateIsNotOrderByCreatetimeDesc(String state);
}
